<%@page import="com.meila.cms.model.UserModel"%>
<%@page import="com.meila.cms.entity.User"%>
<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
 
UserModel user=((UserModel) session.getAttribute("loginUser"));
%>

<!DOCTYPE HTML>
<html lang="zh-CN">
  <head>
 
    
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <title>客户端-头部（JSP导入）</title>
     <%@ include file="../common/common.jsp"%>
	<link href="<%=request.getContextPath() %>/resources/css/system/index/common.css" rel="stylesheet"></link>
	<link href="<%=request.getContextPath() %>/resources/css/system/index/client.css" rel="stylesheet"></link>
 
 
    <script src="<%=request.getContextPath() %>/resources/js/system/carDesign/btnStyle.js"></script>


  </head>
  
  <body>
  	
  	<div class="client-head">
  		<div class="client-headBar">
  			<a class="client-left a-white" href="front/carDesign/carDesign_list">伯坦云设计</a>
  			<div class="client-right right">
  				<a class="a-black client-headUser" href="javascript:void(0)"><i class="fa fa-user"></i><%=user==null? "":user.getPhone() %></a>
  				<a class="a-black" href="<%=request.getContextPath() %>/before/logout">退出</a>
  			</div>
 		</div>
	</div>
  	 
 	<script type="text/javascript">
  		 		 
		$(document).ajaxComplete(function(event, xhr, settings) {
		    //从http头信息取出 在filter定义的sessionstatus，判断是否是 timeout
		    if(xhr.getResponseHeader("sessionstatus")=="timeout"){ 
		        //从http头信息取出登录的url ＝ loginPath
		        if(xhr.getResponseHeader("loginPath")){
		             jAlert("会话过期，请重新登陆!","提示",function(){
			             //打会到登录页面
			             window.location.replace(xhr.getResponseHeader("loginPath"));  
		             }); 
		            
		        }else{  
		       
		            jAlert("请求超时请重新登陆 !","提示");
		        }  
		    }  
		}); 
  	</script>
  </body>
</html>
